<?php
/*
 * @Date: 2021-05-11 23:59:43
 * @Author: yukun
 * @LastEditors: yukun
 * @LastEditTime: 2021-05-12 00:27:06
 * @FilePath: /design-patterns-study/helper.php
 * @Description: 本文件主要功能为：
 */

function autoloadAllFile($currentPath, $currentFileName)
{
    // 扫描$con目录下的所有文件
    $fileNameList = scandir($currentPath);

    foreach ($fileNameList as $fileName) {
        if (!in_array($fileName, ['.', '..', $currentFileName])) {
            require $currentPath . '/' . $fileName;
        }
    }
}